﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Web.Services;
using BLL;
using NS.Utilities;
using NS.BLL.Systems;


public partial class Platform_MemberManage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            GridBind();
        }
    }

    public void GridBind()
    {
        FGridView1.SQLString = MemberService.GetAllMember_SQL(Mobile.Text.Trim());
        FGridView1.PKey = "MemberID";
        FGridView1.OrderName = "MemberID";
        FGridView1.BindData();
        FGridView1.AddControl();
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        GridBind();
    }
    protected void btnLock_Click(object sender, EventArgs e)
    {
    }

    protected void btnDel_Click(object sender, EventArgs e)
    {
        string ID = ((Button)sender).CommandArgument.ToString();
        if (MemberService.DeleteMemberByMemberID(long.Parse(ID)) > 0)
        {
            GridBind();
        }
        else
        {
            MessageBox.ShowError(this, "删除失败，请稍后重试！");
        }
    }
}